
//- This source code is licensed under the terms of the
//- GNU Affero General Public License found in the LICENSE file in
//- the root directory of this source tree.
//-
//- Copyright (c) 2021-present Kaleidos INC

section.table-team.basic-table
    header.row.team-header
        div.username
        div.member-stats
            div.attribute.attribute-name(ng-if="issuesEnabled")
                span(translate="TEAM.COLUMN_MR_WOLF")
                div.tooltip.attribute-explanation
                    span(translate="TEAM.EXPLANATION_COLUMN_MR_WOLF")
            div.attribute(ng-if="tasksEnabled")
                span(translate="TEAM.COLUMN_IOCAINE")
                div.tooltip.attribute-explanation
                    span(translate="TEAM.EXPLANATION_COLUMN_IOCAINE")
            div.attribute(ng-if="wikiEnabled")
                span(translate="TEAM.COLUMN_CERVANTES")
                div.tooltip.attribute-explanation
                    span(translate="TEAM.EXPLANATION_COLUMN_CERVANTES")
            div.attribute(ng-if="issuesEnabled")
                span(translate="TEAM.COLUMN_BUG_HUNTER")
                div.tooltip.attribute-explanation
                    span(translate="TEAM.EXPLANATION_COLUMN_BUG_HUNTER")
            div.attribute(ng-if="tasksEnabled")
                span(translate="TEAM.COLUMN_NIGHT_SHIFT")
                div.tooltip.attribute-explanation
                    span(translate="TEAM.EXPLANATION_COLUMN_NIGHT_SHIFT")
            div.attribute
                span(translate="TEAM.COLUMN_TOTAL_POWER")
                div.tooltip.attribute-explanation
                    span(translate="TEAM.EXPLANATION_COLUMN_TOTAL_POWER")

    div.hero(
        tg-team-current-user
        stats="stats"
        currentuser="currentUser"
        project="project"
        issuesEnabled="issuesEnabled"
        tasksenabled="tasksEnabled"
        wikienabled="wikiEnabled"
        owner="owner"
        ng-if="::currentUser"
    )

h2(ng-show="memberships.length")
    span(translate="TEAM.SECTION_TITLE_TEAM")
    span  {{filtersRole.name || ("TEAM.SECTION_FILTER_ALL" | translate)}}

section.table-team.basic-table(
    tg-team-members
    memberships="memberships"
    stats="stats"
    filtersq="filtersQ"
    filtersrole="filtersRole"
    issuesEnabled="issuesEnabled"
    tasksenabled="tasksEnabled"
    wikienabled="wikiEnabled"
    owner="owner"
)
